package com.dragon.codefx.dataBase.service.impl;

import com.dragon.codefx.dataBase.dao.TableSearchConfigDao;
import com.dragon.codefx.dataBase.entity.TableSearchConfigEntity;
import com.dragon.codefx.dataBase.service.TableSearchConfigService;
import com.dragon.common.JpaServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 数据表表查询配置 业务接口实现类
 *
 * @author lsc
 * @version V1.0
 * @date 2025-6-23
 */
@Slf4j
@Service
public class TableSearchConfigServiceImpl extends JpaServiceImpl<TableSearchConfigDao, TableSearchConfigEntity, Integer> implements TableSearchConfigService {

    @Override
    public List<TableSearchConfigEntity> findBySchemaAndTable(String schemaName, String tableName) {
        return getJpaDao().findAllBySchemaNameAndTableName(schemaName, tableName);
    }

    @Override
    public void delete(String schemaName, String tableName) {
        getJpaDao().deleteBySchemaNameAndTableName(schemaName, tableName);
    }
}